package com.example.souvenir.product.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 添加相册的DTO类
 *
 * @author hzx
 * @version 0.0.1
 */
@Data
public class AlbumAddNewDTO implements Serializable {
    /**
     * 相册名称
     */
    @NotNull(message = "添加相册失败,相册id不能为null")
    @ApiModelProperty(value = "相册名称", example = "相册1", required = true)
    private String name;

    /**
     * 相册简介
     */
    @NotNull(message = "添加相册失败,相册简介不能为null")
    @ApiModelProperty(value = "相册简介", example = "相册1的描述", required = true)
    private String description;

    /**
     * 自定义排序序号
     */
    @NotNull(message = "添加相册失败,排序序号不能为null")
    @Range(max = 255,message = "添加相册失败，排序序号必须是【0，255】之间的数值")
    @ApiModelProperty(value = "自定义排序序号", example = "88")
    private Integer sort;
}
